<?php
$star = 1;
if($_GET['id'])
{
	$id = $_GET['id'];
} 
require_once('../../libraryfiles/config.php');

if($_GET['confirm'])
{
	$confirm = $_GET['confirm'];
}
echo "SELECT activate,id FROM tbluser WHERE tbluser.id='".$id."' AND activate='".$confirm."'";
$check_a = mysql_query("SELECT activate FROM tbluser WHERE tbluser.id='".$id."' AND activate='".$confirm."'");
echo dbNumRows($check_a);
die;
if(dbNumRows($check_a))
if($check_a)
		{
		$check = mysql_query("SELECT status FROM tbluser WHERE tbluser.id='".$id."'");
			$rows=mysql_fetch_assoc($check);
			$status=$rows['status'];
			 if($status=="0"){
				$st_users = "UPDATE tbluser SET status='".$star."' WHERE tbluser.id='".$id."'";
		$statuss = mysql_query($st_users);
die;		
		//$editRow="SELECT * FROM tbluser WHERE tbluser.id='".$id."'";
//		$query=mysql_query($editRow);	
//		$result=mysql_fetch_array($query);
//		
//		echo $fname = $result['first_name'];die();
//		$lname = $result['last_name'];
//		$emailf = $result['email'];
//		
//		
//		
//		
//		
//		
//		
//		$str_profile = "UPDATE tbluser_profile SET first_name='$first_name', 
//				last_name='$last_name', 
//				email='$email',
//				mobile='$mobile',
//				phone='$phone',
//				region='$region',
//				address='$address',
//				city='$city',
//				zip='$zip'
//				WHERE 
//				tbluser_profile.provider=".$_SESSION['acc_id'];	
//	mysql_query($str_profile);
			 }
			 else
			 {
				//header('Location:../../login.php?message=Your account has already activated!, Please Login to you account.');
				 //echo 'Your account has already activated!';
			 }
		}
		else
		{
			echo 'Your Account is not Active yet!';
		}

?>